<template>
  <view>
    <u-navbar title="消息提醒" back-icon-size="34" title-size="36" :border-bottom="false" :background="background" title-color="#222" back-icon-color="#222"></u-navbar>
    <view class="" style="margin: 23rpx 28rpx; background: #fff; border-radius: 12rpx" v-for="(i, k) in chatlist" :key="k">
      <view class="" style="display: flex; align-items: center; padding: 33rpx 36rpx; justify-content: space-between">
        <view class="" style="display: flex; align-items: center">
          <image src="https://wenzhen.jiangkukeji360.com/static/shop/shopxx.png" mode="" style="width: 32rpx; height: 32rpx"></image>
          <view class="" style="font-size: 26rpx; color: #999999; padding-left: 16rpx">系统消息</view>
        </view>
        <view class="" style="font-size: 24rpx; color: #999999">
          {{ i.create_time_text }}
        </view>
      </view>
      <view class="" style="font-size: 26rpx; padding-left: 26rpx; padding-bottom: 52rpx">
        {{ i.content }}
      </view>
    </view>
  </view>
</template>

<script>
export default {
  name: '',
  data() {
    return {
      background: {
        background: '#FFFFFF'
      },
      page: 1,
      chatlist: []
    };
  },
  //方法
  methods: {
    mychat() {
      this.api({
        url: '/api/news/getMessageList',
        method: 'post',
        data: {
          page: this.page
        }
      }).then((res) => {
        this.chatlist = this.chatlist.concat(res.data);
        this.page++;
      });
    }
  },
  //首页渲染
  onLoad(options) {
    this.mychat();
  },
  //监听
  watch: {},
  //计算属性
  computed: {}
};
</script>

<style lang="scss" scoped>
page {
  background: #f8f8f8;
}
</style>
